package com.skmc.okcashbag.card;

import android.app.Activity;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.widget.Button;

import com.skmc.okcashbag.home.R;

public class CardRegisterInfoActivity extends Activity {

	private Button cardBtn;
	private Button closeBtn;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    requestWindowFeature(Window.FEATURE_NO_TITLE);
	    setContentView(R.layout.card_register_info);
	    
	    cardBtn =  (Button)findViewById(R.id.cardBtn);
	    cardBtn.setOnClickListener(onCard);
	    
	    closeBtn = (Button)findViewById(R.id.closeBtn);
	    closeBtn.setOnClickListener(onClose);
	}
    
	private View.OnClickListener onCard = new View.OnClickListener() {
		
		@Override
		public void onClick(View v) {
			
			finish();
			overridePendingTransition(R.anim.fade, R.anim.hold);
		}
	};
	
	private View.OnClickListener onClose = new View.OnClickListener() {
		
		@Override
		public void onClick(View v) {
			finish();
    		overridePendingTransition(R.anim.fade, R.anim.hold);
		}
 	};
	
	@Override
    public void onConfigurationChanged(Configuration newConfig) {
               // TODO Auto-generated method stub
               super.onConfigurationChanged(newConfig);
               
    }
	
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event){
		if(keyCode == KeyEvent.KEYCODE_BACK){
			finish();
			overridePendingTransition(R.anim.fade, R.anim.hold);
		}return super.onKeyDown(keyCode, event);
	}

}
